package mil.af.amc.adpetracker.model;

import javax.persistence.*;
import java.util.List;
import java.util.ArrayList;
import java.io.Serializable;

/**
 * Please Fill in this Javadoc
 *
 * @author TSgt Jason Ferguson
 */

@Entity
@Table(name="T_DRA")
public class DRA implements Serializable {

    private int id;
    private String name;
    private List<AdpeAccount> adpeAccounts;

    public DRA() {

    }

    public DRA(int id, String name) {
        this.id = id;
        this.name = name;
        this.adpeAccounts = new ArrayList<AdpeAccount>();
    }

    @Id
    @Column(name="DRAID")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Column(name="NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @OneToMany(mappedBy="dra")
    public List<AdpeAccount> getAdpeAccounts() {
        return adpeAccounts;
    }

    public void setAdpeAccounts(List<AdpeAccount> adpeAccounts) {
        this.adpeAccounts = adpeAccounts;
    }
}
